﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<calculation.Models.Order>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Изменение</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Name) %>
                <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            
            
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.State) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("StateId", (IEnumerable<SelectListItem>) ViewData["States"]) %>
                <%: Html.ValidationMessageFor(model => model.State) %>
            </div>
            
                     
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Material) %>
            </div>
            <div class="editor-field">
                 <%: Html.DropDownList("MaterialId", (IEnumerable<SelectListItem>) ViewData["Materials"]) %>
                <%: Html.ValidationMessageFor(model => model.MaterialId) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Detal) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("DetalId", (IEnumerable<SelectListItem>) ViewData["Detals"]) %>
                <%: Html.ValidationMessageFor(model => model.DetalId) %>
            </div>
            
            
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Назад к списку", "Index") %>
    </div>

</asp:Content>

